import request from '@/apis/request'
// appid: 'wx723e797f8b5b809f',
// secret: 'ac4d16448d7bec20fa3fdf4ec1cd755a'
/**
 * 登录接口
*/
/**
 * 登录接口-获得租户详情
*/
export const getTenantsApi = (data = {}) => {
    return request('/api/tenants', 'GET', data, true, true);
}
/**
 * 登录接口-登录
*/
export const postAuthLoginApi = (data = {}) => {
    return request('/api/auth/login', 'POST', data, true, true);
}
/**
 * 商城接口
*/
/**
 * 商城接口-商品类型列表
*/
export const getCategoriesApi = (data = {}) => {
    return request('/api/categories', 'GET', data, false, true);
}
/**
 * 商城接口-商品列表
*/
export const getProductsApi = (data = {}) => {
    return request('/api/products', 'GET', data, false, true);
}
/**
 * 商城接口-商品详情
*/
export const getProductsIdApi = (id='',data = {}) => {
    return request('/api/products/'+id, 'GET', data, true, true);
}
/**
 * 商城接口-购物车列表
*/
export const getCartApi = (data = {}) => {
    return request('/api/cart', 'GET', data, true, true);
}
/**
 * 商城接口-添加商品到购物车
*/
export const PostCartApi = (data = {}) => {
    return request('/api/cart', 'POST', data, false, true);
}
/**
 * 商城接口-更新商品到购物车
*/
export const putCartApi = (id = '',data = {}) => {
    return request('/api/cart/'+ id, 'PUT', data, false, true);
}
/**
 * 商城接口-删除购物车记录
*/
export const deleteCartApi = (data = {}) => {
    return request('/api/cart', 'DELETE', data, false, true);
}
/**
 * 商城接口-购物车单个选中
*/
export const postCartIdSelectApi = (id = '',data = {}) => {
    return request('/api/cart/'+ id + '/select', 'POST', data, false, true);
}
/**
 * 商城接口-购物车单个取消选中
*/
export const postCartIdUnselectApi = (id = '',data = {}) => {
    return request('/api/cart/'+ id + '/unselect', 'POST', data, false, true);
}
/**
 * 商城接口-购物车批量选中
*/
export const postCartSelectApi = (data = {}) => {
    return request('/api/cart/select', 'POST', data, false, true);
}
/**
 * 商城接口-购物车批量取消选中
*/
export const postCartUnselectApi = (data = {}) => {
    return request('/api/cart/unselect', 'POST', data, false, true);
}
/**
 * 商城接口-收货地址列表
*/
export const getAddressesApi = (data = {}) => {
    return request('/api/addresses', 'GET', data, true, true);
}
/**
 * 商城接口-创建收货地址
*/
export const postAddressesApi = (data = {}) => {
    return request('/api/addresses', 'POST', data, true, true);
}
/**
 * 商城接口-修改收货地址
*/
export const putAddressesIdApi = (id = '',data = {}) => {
    return request('/api/addresses/'+ id, 'PUT', data, true, true);
}
/**
 * 商城接口-删除收货地址
*/
export const deleteAddressesIdApi = (id = '',data = {}) => {
    return request('/api/addresses/'+ id, 'DELETE', data, true, true);
}
/**
 * 商城接口-设置默认收货地址
*/
export const putAddressesIdSetDefaultApi = (id = '',data = {}) => {
    return request('/api/addresses/'+ id + '/set-default', 'PUT', data, true, true);
}
// 分割线------------------------------------------------------------------------------------------


// 微信获取手机号
export const getWxPhoneApi = (data = {}) => {
    return request('/bygex/jdzh/getWxPhone', 'POST', data, true, true);
}

export const getCityApi = (data = {}) => {
    return request('/api/api/common/getCity', 'POST', data, false, true);
}

export const getPlaceRetrievalApi = (data = {}) => {
    return request('/bygex/baiduapi/getPlaceRetrieval', 'POST', data, false, true);
}
// 上传图片
export const fileUploadBase64ExApi = (data = {}) => {
    return request('/business/api/file/fileUploadBase64Ex', 'POST', data, true, true);
}
// 保存订单
export const appSaveOrderApi = (data = {}) => {
    return request('/bygex/jdzh/appSaveOrder', 'POST', data, true, true);
}
// 路线偏好
export const countkilometreApi = (data = {}) => {
    return request('/bygex/jdzh/countkilometre', 'POST', data, false, true);
}
// 金额
export const countmoneyApi = (data = {}) => {
    return request('/bygex/jdzh/countmoney', 'POST', data, false, true);
}
// 获取订单列表
export const getAppOrderListApi = (data = {}) => {
    return request('/bygex/jdzh/getAppOrderList', 'POST', data, false, true);
}
// 优惠列表
export const preferentialListApi = (data = {}) => {
    return request('/bygex/jdzh/preferentialList', 'POST', data, false, true);
}
export const robotSafeStudyListApi = (data = {}) => {
    return request('/api/api/common/getCity', 'POST', data, false, true);
}


// 根据经纬度获取省市区
export const getAreaApi = (data = {}) => {
    return request('/bygex/jdzh/getArea', 'POST', data, true, true);
}
// 删除订单
export const hideOrderApi = (data = {}) => {
    return request('/bygex/jdzh/hideOrder', 'POST', data, false, true);
}
// 获取优惠券
export const getCouponCodeListApi = (data = {}) => {
    return request('/bygex/jdzh/getCouponCodeList', 'POST', data, false, true);
}
// 检查是否开通城市服务
export const checkCityOpenServiceApi = (data = {}) => {
    return request('/bygex/jdzh/checkCityOpenService', 'POST', data, true, true);
}
// 生成邀请码
export const createInvitationCodeApi = (data = {}) => {
    return request('/bygex/jdzh/createInvitationCode', 'POST', data, true, true);
}

// 下单接口
export const placeOrderApi = (data = {}) => {
    return request('/bygex/jdzhShop/placeOrder', 'POST', data, true, true);
}
// 订单列表
export const orderListApi = (data = {}) => {
    return request('/bygex/jdzhShop/orderList', 'POST', data, false, true);
}
// 签到
export const signInApi = (data = {}) => {
    return request('/bygex/jdzhShop/signIn', 'POST', data, true, true);
}
// 积分变动列表
export const pointsRecordListApi = (data = {}) => {
    return request('/bygex/jdzhShop/pointsRecordList', 'POST', data, false, true);
}
// 支付信息
export const getWechatMiniParamApi = (data = {}) => {
    return request('/bygex/jdzhShop/getWechatMiniParam', 'POST', data, true, true);
}
// 添加许愿商品  参数：goodsName，goodsImg
export const addShopWishApi = (data = {}) => {
    return request('/bygex/jdzhShop/addShopWish', 'POST', data, true, true);
}
// 获取许愿商品列表 参数：无
export const getWishGoodsListApi = (data = {}) => {
    return request('/bygex/jdzhShop/getWishGoodsList', 'POST', data, false, true);
}
// 删除许愿商品 ，参数：wishId 
export const delShopWishApi = (data = {}) => {
    return request('/bygex/jdzhShop/delShopWish', 'POST', data, false, true);
}
